package c2.advanced.share;

import c2.advanced.business.base.KvDao;
import c2.advanced.business.demo.DemoDao;
import c2.advanced.business.help.adventure.CrossAdventureDao;
import c2.advanced.business.help.snapshot.CrossSnapshotDao;
import c2.advanced.server.configuration.SetupContext;
import lombok.Getter;
import org.springframework.data.mongodb.core.MongoTemplate;

public abstract class DbFacade {

    @Getter
    protected MongoTemplate mongoTemplate;

    public CrossAdventureDao cross_adventure = new CrossAdventureDao(this);
    public CrossSnapshotDao cross_snapshot = new CrossSnapshotDao(this);

    public void setup(SetupContext context) {
        this.mongoTemplate = context.mongoTemplate;
    }

    public KvDao kv = new KvDao(this);
    public DemoDao demo = new DemoDao(this);
}
